package com.come4loves.game.module.fight.action;

import com.come4loves.game.proto.BattleProto;
import com.google.protobuf.GeneratedMessage.Builder;

public class MagicChangeAction extends Action {
	private int currentMagic;
	private int maxMagic;
	public MagicChangeAction(long actorId, int currentMagic, int maxMagic) {
		super(actorId);
		this.currentMagic = currentMagic;
		this.maxMagic = maxMagic;
	}
	
	public int getCurrentMagic() {
		return currentMagic;
	}
	
	public int getMaxMagic() {
		return maxMagic;
	}
	
	
	@Override
	public Builder<?> toProtocolBufferBuilder() {
		BattleProto.MagicChangeAction.Builder builder = BattleProto.MagicChangeAction.newBuilder();
		builder.setId(this.id);
		builder.setCurrentMagic(this.currentMagic);
		builder.setMaxMagic(this.maxMagic);
		return builder;
	}
}
